<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <title>{$tkd.title|parseTpl}</title>
    <meta name="keywords" content="{$tkd.keywords|parseTpl}">
    <meta name="description" content="{$tkd.description|parseTpl}">
    <link rel="stylesheet" type="text/css" href="{$kx.config.resurl}/template/kxmobileno2/css/ptm.min.css" />
    <link rel="stylesheet" type="text/css" href="{$kx.config.resurl}/template/kxmobileno2/css/skin.min.css" />
    <link rel="stylesheet" type="text/css" href="{$kx.config.resurl}/template/kxmobileno2/css/font-awesome.min.css" />
</head>
<body>
<header class="ptm-bar ptm-bar-nav  ptm-fix">
    <a class="ptm-pull-left" href="{$kx.config.mobileurl}">
        <span class="ptm-iconfont fa fa-home" style="font-size:22px;"></span>
    </a>
    <div class="ptm-title"> {$category.name}小说</div>
    <a class="ptm-pull-right" href="{link=user.index.index}">
        <span class="ptm-iconfont  fa fa-user"></span>
    </a>
</header>
<section class="ptm-content" style="margin-top:45px;">
    <div class="ptm-tab">
        <ul class="ptm-tab-nav">
            <li><a href="{$kx.config.mobileurl}">首页</a></li>
            <li><a href="{link=novel.category.index}">排行</a></li>
            <li class="active"><a href="{link=novel.category.index}">分类</a></li>
            <li><a href="{link=novel.over.index}">全本</a></li>
            <li><a href="{link=novel.search.index}">搜书</a></li>
        </ul>
    </div>
    <div class="ptm-card" style="margin-top:15px;">
        <div class="ptm-card-header">
            <div class="ptm-pull-left">
                {$category.name}小说
            </div>
            <div class="ptm-pull-right">
                第{$page}页
            </div>
        </div>
        <div class="ptm-card-content">
            <ul class="pt-card pt-card-2">
                {block method="pagination" name="paginate" page=$page limit=$pagesize count=$category.num maxpage=50 section=3}
                {block method="novel.list" name=list category=$category.id order=weekvisit num=$paginate.limit page=$paginate.current}
                {section loop=$list item=$loop}
                <li>
                    <div class="pt-cover">
                        <a href="{link=novel.novel.index novelid=$loop.novel.id pinyin=$loop.novel.pinyin}" title="{$loop.novel.name}"><img src="{$loop.novel.cover}" alt="{$loop.novel.name}"></a>
                    </div>
                    <div class="pt-novel">
                        <div class="pt-name"><a href="{link=novel.novel.index novelid=$loop.novel.id pinyin=$loop.novel.pinyin}" title="{$loop.novel.name}">{$loop.novel.name}</a></div>
                        <div class="pt-info">{$loop.author.name}&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{link=novel.category.list categoryid=$loop.category.id key=$loop.category.key}">{$loop.category.name}</a></div>
                        <div class="pt-desc ptm-text-cut2">{$loop.novel.intro}</div>
                    </div>
                </li>
                {/loop}
            </ul>
        </div>
        <div class="ptm-card-footer " style="padding:0 10px;height:50px;">
            <div class="pt-dir-page ptm-clearfix">
                <div class="ptm-col-xs-3">
                    {if $paginate.current==1}
                    <a class="ptm-btn ptm-btn-primary ptm-btn-block ptm-btn-outlined" href="#">上一页</a>
                    {else}
                    <a class="ptm-btn ptm-btn-primary ptm-btn-block ptm-btn-outlined" href="{link=novel.category.list categoryid=$category.id key=$category.key page=$paginate.prev}">上一页</a>
                    {/if}
                </div>
                <div class="ptm-col-xs-6" style="padding:0 10px;">
                    <button class="ptm-btn ptm-btn-primary ptm-btn-block ptm-btn-outlined showdir"><span>第{$paginate.current}页 </span><i class="fa fa-angle-down pt-dir-icon"></i></button>
                </div>
                <div class="ptm-col-xs-3">
                    {if $paginate.current == $paginate.last}
                    <a class="ptm-btn ptm-btn-primary ptm-btn-block ptm-btn-outlined" href="#">下一页</a>
                    {else}
                    <a class="ptm-btn ptm-btn-primary ptm-btn-block ptm-btn-outlined" href="{link=novel.category.list categoryid=$category.id key=$category.key page=$paginate.next}">下一页</a>
                    {/if}
                </div>
            </div>
        </div>
    </div>
</section>

<div class="sel ptm-hide">
    <div class="ptm-alert-shade"></div>
    <div class="pt-dir-sel" style="background-position: left 50px;">
        <p class="title">请选择页码</p>
        <ul>
            {if !$paginate.prev>1}
            <li><a href="{link=novel.category.list categoryid=$category.id key=$category.key page=$paginate.first}">第{$paginate.first}页</a></li>
            {/if}
            {loop=$paginate.items}
            {if $loop.status}
            <li class="active"><a href="__SELF__">第{$paginate.current}页</a></li>
            {else}
            <li><a href="{link=novel.category.list categoryid=$category.id key=$category.key page=$loop.num}">第{$loop.num}页</a></li>
            {/if}
            {/loop}
            {if $paginate.current<$paginate.count}
            <li><a href="{link=novel.category.list categoryid=$category.id key=$category.key page=$paginate.last}">第{$paginate.last}页</a></li>
            {/if}
        </ul>
    </div>
</div>
{include file="/system/footer"}
<script type="text/javascript">
    $(function () {
        $('.showdir').on('click',function(){
            $('.sel').removeClass('ptm-hide')
        })
        $('.ptm-alert-shade').on('click',function(){
            $('.sel').addClass('ptm-hide')
        })
    })
</script>
</body>
</html>